/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tasks.ui.architecture;

import common.ControllerException;
import common.DomainException;
import java.util.Map;
import java.util.Set;
import common.Observable;
import common.Observer;
import common.ObserverInterest;
import domain.LayerDTO;
import domain.Unit;
import domain.UnitDTO;
import domain.UnitTypeDTO;
import java.util.List;

/**
 *
 * @author David
 */
public interface ArchitectureController extends Observable, Observer{

    void addLayer(String name, int number) throws DomainException;

    Map<String, LayerDTO> getLayers();

    Set<UnitDTO> getUnitsFromLayer(String name);

    void removeLayer(String name);

    void addUnitToLayer(String unitName, String type) throws DomainException;

    void removeUnitFromLayer() throws ControllerException;

    void setSelectedLayer(String name);

    String getSelectedLayer();

    void setSelectedUnit(UnitDTO unit);

    UnitDTO getSelectedUnit();

    List<Integer> getUsedLayerNumbers();

    Map<String, LayerDTO> getAvailableAllowedLayers() throws ControllerException;

    Map<String, LayerDTO> getAllowedLayersForLayer() throws DomainException, ControllerException;

    void addAllowedLayerToLayer(String toLayer) throws DomainException, ControllerException;

    void removeAllowedLayer(String deleteLayer) throws DomainException, ControllerException;

    @Override
    void addObserver(Observer observer, ObserverInterest interest);

    @Override
    boolean removeObserver(Observer observer);
}
